package cz.possoft.explorer.converter;

import java.util.Collection;

/**
 * Converter can be used to convert different types to our requested type. 
 * 
 * @author <a href="mailto:mposolda@gmail.com">Marek Posolda</a>
 * @version $Revision$
 */
public interface Converter
{
   /**
    * @param <F> - input type
    * @param <T> - output type
    * @param input for converting.
    * @param outputClazz - class which will be used to determine output type of converter output.
    * @return converted output of type T, which is created from input object of type F
    * @throws ConverterException
    */
   public <F,T> T convert(F input, Class<T> outputClazz) throws ConverterException;     
   
   /**
    * get all types from ConverterProvider class, which can be converted from String
    * 
    * @return collection with stringConverterTypes.
    */   
   public Collection<Class<?>> getStringConverterTypes();
   
   /**
    * We need to reset stringCoverterTypes when we replacing converter provider with new converter provider.
    *
    */   
   public void resetStringConverterTypes();
}

